#ifndef __CH8001_H__
#define __CH8001_H__

#include "main.h"

// 默认音效文件夹编号
#define AUDIO_FOLDER_SYSTEM                 1   // 系统音效
    #define AUDIO_SYSTEM_START          1
    #define AUDIO_SYSTEM_WARNNING       2
    #define AUDIO_SYSTEM_ERROR          3
    #define AUDIO_SYSTEM_SLEEP          4
    #define AUDIO_SYSTEM_BATTERY_LOW    5
    #define AUDIO_SYSTEM_BATTERY_FULL   6

struct ch8001Stu {
    UART_HandleTypeDef *huart;
    uint8_t chSendBuffer[10];
};

void ch_set_vol(struct ch8001Stu *ch, uint8_t mem, uint8_t vol);
void ch_Init(struct ch8001Stu *ch);
void ch_play(struct ch8001Stu *ch, uint16_t index);
void ch_play_folder(struct ch8001Stu *ch, uint8_t folderIndex, uint8_t audioIndex);
void ch_sleep(struct ch8001Stu *ch);

#endif
